package school.valon.persistence.pojo;

import java.io.Serializable;

import javax.persistence.*;

import java.util.Date;


/**
 * The persistent class for the school_policy database table.
 * 
 */
@Entity
@Table(name="school_policy")
@NamedQueries({
@NamedQuery(name="SchoolPolicy.findAll", query="SELECT s FROM SchoolPolicy s"),
@NamedQuery(name="SchoolPolicy.deleteById", query="DELETE FROM SchoolPolicy WHERE policyId = :P1")
})
public class SchoolPolicy implements Serializable {

	private static final long serialVersionUID = 4317894586073775186L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="policy_id")
	private Integer policyId;

	@Temporal(TemporalType.DATE)
	@Column(name="created_on")
	private Date createdOn;

	@Column
	private String item;

	@Column(name="item_details")
	private String itemDetails;

	//bi-directional many-to-one association to Staff
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="created_by_staff_id")
	private Staff staff;

	public Integer getPolicyId() {
		return this.policyId;
	}

	public void setPolicyId(Integer policyId) {
		this.policyId = policyId;
	}

	public Date getCreatedOn() {
		return this.createdOn;
	}

	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}

	public String getItem() {
		return this.item;
	}

	public void setItem(String item) {
		this.item = item;
	}

	public String getItemDetails() {
		return this.itemDetails;
	}

	public void setItemDetails(String itemDetails) {
		this.itemDetails = itemDetails;
	}

	public Staff getStaff() {
		return this.staff;
	}

	public void setStaff(Staff staff) {
		this.staff = staff;
	}

}